const mongoose = require('mongoose');

const { Schema, model } = mongoose;

const topicSchema = new Schema({
  __v: { type: Number, select: false },
  topicName: { type: String, required: true },
  topicDesc: { type: String},
  diaryCount: { type: Number }, // 手账数
  clickNum: { type: Number }, // 点击数
  thumbImgUrl: { type: String },
  imgUrl: { type: String },
  createdAt: {type: String, select: false},
  updatedAt: {type: String, select: false}
}, { timestamps: true });

module.exports = model('Topic', topicSchema);
